package com.cea.papyrus.diagram.component.figure;

import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.SWT;

import com.cea.papyrus.core.figures.ElementFigure;

/**
 * this figure draws an half circle to represent the provideded interface
 * @author Patrick Tessier
 *
 */
public class PortFigure extends ElementFigure {

	
	public void paintFigure(Graphics graphics) {
		graphics.pushState();
		graphics.setAntialias(SWT.ON); 
		Rectangle area = getBounds();
		graphics.setLineWidth(2);
		graphics.drawRectangle(area.x+2, area.y+2, area.width-4, area.height-4);
		graphics.popState();
	}

}
